﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using ExtAspNet;

public partial class Module_StaffManger_ResetPwd : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Cancel.OnClientClick = ActiveWindow.GetHideReference();
    }
    protected void btnChangePwd_Click(object sender, EventArgs e)
    {
        if (newPWD1.Text!=newPWD2.Text)
        {
            Alert.Show("两次输入的密码不一致!");
            return;
        }

        Ylh.BLL.StaffBLL blls = new Ylh.BLL.StaffBLL(DbConnectionStr);

        if (blls.UpdateStaffPwd(Convert.ToInt32(Request.QueryString["StaffID"].ToString()), newPWD2.Text) == 1)
        {
            PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
        }
        else
        {
            Alert.Show("密码重置失败");
        }
        


    }
}